#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
typedef double Ldouble;
Ldouble n,p;
Ldouble Solve(Ldouble k) {
	Ldouble res=1;
	Ldouble tmp=n-p;
	for (Ldouble i=2; i<=k; ++i) {
		res=res*(tmp+i)/(n+i);
	}
	res=k*res;
	return res;
} 
int main() {
	scanf("%lf%lf", &n, &p);
	Ldouble res=p/(n+1);
	Ldouble k1=(long long)(n/(p-1))-1;
//	cout<<"so: "<<Solve(k1)<<endl;
	Ldouble tmp=p/(n+1);
//	cout<<"tmp: "<<tmp<<endl;
	if (k1>1 && tmp*Solve(k1)>res) res=tmp*Solve(k1);
	Ldouble k2=k1-1;
	if (k2>1 && tmp*Solve(k2)>res) res=tmp*Solve(k2);
	k2=k1+1;
	if (k2>1 && tmp*Solve(k2)>res) res=tmp*Solve(k2);
	printf("%0.8lf\n", res);
	return 0;
} 
/*
1000000 200000
*/
